<!DOCTYPE html>
<html>
	<head lang="es">
		<?php echo $this->Html->charset(); ?>
		<title>
			<?php echo $this->fetch('title'); ?>
		</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<?php 
			echo $this->Html->meta("icon", "/img/logo-icon.ico", array("rel" => "shortcut icon"));
			echo $this->fetch('meta');
			if ($mobile == true) {
				echo $this->Html->css('miBus-mobile.css');
				echo $this->Html->css('sprites-mobile.css');
			}
			else {
				echo $this->Html->css('miBus.css');
				echo $this->Html->css('sprites-desktop.css');
			}
			echo $this->fetch('css');
		?>
	</head>
	<body>
		<div id="header" class="editable">
			<div id="user_info">
				<div id="user" class="menu">
					<div class="link block">
						<span class="icon micuenta centered"></span>
						<span class="text centered">
							<?php echo $this->Session->read("phpCAS.attributes.NombreCompleto"); ?>
						</span>
					</div>
				</div>
			</div>
			<div id="navbar" class="menu">
				<div id="logo">
					<a href="/" class="icon logo"></a>
				</div>
				<div id="nav">
					<?php 
						echo $this->fetch("navigation");
					?>
				</div>
			</div>
		</div>
		<div id="content" class="content">
			<?php $flash = $this->Session->flash(); ?>
			<div id="notifications" style="<?php if ($flash != ""){ echo 'display: block;'; } ?>">
				<span class="icon cerrar-negro"></span>
				<div id="msg"><?php if ($flash != ""){echo $flash;} ?></div>
			</div>
			<div id="subcontent">
				<?php echo $this->fetch('content'); ?>
			</div>
		</div>
		<div id="footer" class="editable">
			<div id="system_info" class="menu">
				<div class="link block">
					<span class="icon informacion centered"></span>
					<?php 
						echo $this->Html->link(
							"Información Sistema de Transporte",
							'/files/Rutas EIA 2013.pdf',
							array(
								"class" => "centered",
								"target" => "_blank"
								)
							)
					?>
				</div>
			</div>
			<div id="contact_us" class="menu">
				<div class="link block">
					<span class="icon contacto centered"></span>
					<span class="text centered">Cont&aacute;ctenos</span>
				</div>
			</div>
		</div>
		<div id="menus">
			<div id="user_menu" class="">
				<?php
					echo $this->fetch("user_menu_links");
				?>
		        <div class="link" id="cerrarsesion">
		            <span class="text"><?php echo $this->Html->link("Cerrar Sesión", array("controller" => "Login", "action" => "logout")); ?></span>
		        </div>
		    </div>
			<?php 
				echo $this->fetch("menus");
			?>
			<div id="contact_us_menu">
		        <?php 
		            echo $this->Form->create("Contactenos", array("url" => array("controller" => "Contactenos", "action" => "contacto")));
		            echo $this->Form->input("asunto", array("label" => "Asunto"));
		            echo $this->Form->input("mensaje", array("label" => "Mensaje", "type" => "textarea"));
		            echo $this->Js->submit("Enviar", array(
		                "url" => Router::url(array("controller" => "Contactenos", "action" => "contacto"), true),
		                "before" => "beforeSendContacto()",
		                "success" => "successSendContacto(data, textStatus)",
		                "complete" => "completeSendContacto()",
		                "error" => "errorSendContacto(XMLHttpRequest, textStatus, errorThrown)",
		                "type" => "json",
		                "method" => "post"
		                ));
		            echo $this->Form->end();
		        ?>
		    </div>
		</div>
		<?php
		echo $this->Html->script("jquery-1.10.2.min");
		?>
		<!--[if lte IE 8]>
		<?php echo $this->Html->script("css3-mediaqueries.min"); ?>
		<![endif]-->
		<?php
		echo $this->Html->script("miBus.min");
		echo $this->Js->writeBuffer();
		echo $this->fetch('script');
		?>
	</body>
</html>